<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">
<h:head>
	<title>A Simple JavaServer Faces 2.0 View</title>
</h:head>
<h:body>
	<h:form id="mainForm">
		<h:panelGrid columns="4">
			<h:outputText value="Ennyi gazdát generáljunk"/>
			<h:inputText id="numOfOwners" value="#{petJsfBean.ownerNumber}">
				<f:validateLongRange minimum="1" maximum="100000" />
			</h:inputText>
			<h:message for="numOfOwners"/>
			<h:commandButton value="Gazda generálás">
				<f:ajax event="click" execute="numOfOwners"
					listener="#{petJsfBean.generateOwner}" render="statusMessage"></f:ajax>
			</h:commandButton>
			
			<h:outputText value="Ennyi harcot generáljunk"/>
			<h:inputText id="numOfFights" value="#{petJsfBean.fightNumber}">
				<f:validateLongRange minimum="1" maximum="100000" />
			</h:inputText>
			<h:message for="numOfFights"/>
			<h:commandButton value="Kutya-macska harc generálás">
				<f:ajax event="click" execute="numOfFights"
					listener="#{petJsfBean.generateFight}" render="statusMessage"></f:ajax>
			</h:commandButton>
		</h:panelGrid>
		<h:outputText id="statusMessage" value="#{petJsfBean.status}"/>
	</h:form>
</h:body>
</html>
